<template>
<Modal v-model="modalEdit" fullscreen @on-cancel="handleModalEditCancel" 
@on-ok="handleModalEditOK" ok-text="提交">
	<template #header>
		<Icon custom="iconfont icon-Word"/>&nbsp;听证意见书&nbsp;
	</template>
	<div><Row justify="center"><Col span="16">
		<Form ref="baseform" :model="baseform" :label-width="150">
		<Card title="案件情况" icon="ios-bookmark">
			<template #extra>
				{{baseform.party_name}}&nbsp;涉嫌&nbsp;{{baseform.cause_name}}
			</template>
			<Alert show-icon>
				原处理意见
				<template #desc>{{baseform.undertaker_opinion}} </template>
			</Alert>
			<FormItem label="类别" prop="review_type">
				<RadioGroup v-model="baseform.review_type">
					<Radio label="陈述申辩" border></Radio>
					<Radio label="听证" border></Radio>
				</RadioGroup>
			</FormItem>
			<FormItem label="当事人提出的事实、理由和证据" prop="party_opinion">
				<Input v-model="baseform.party_opinion" maxlength="300" show-word-limit type="textarea" :rows="5"/>
			</FormItem>
			<FormItem label="是否需要变更撤销处罚内容" prop="change_penalty">
				<RadioGroup v-model="baseform.change_penalty">
					<Radio label="需要撤销" border></Radio>
					<Radio label="需要变更" border></Radio>
					<Radio label="不需要" border></Radio>
				</RadioGroup>
			</FormItem>
			<FormItem label="变更撤销属性" prop="change_attr">
				<RadioGroup v-model="baseform.change_attr">
					<Radio label="执法主体错误" border></Radio>
					<Radio label="事实不清" border></Radio>
					<Radio label="法律错误" border></Radio>
					<Radio label="具有减轻情形" border></Radio>
					<Radio label="具有从轻情节" border></Radio>
				</RadioGroup>
			</FormItem>
		</Card>
		<br>
		<Card title="复核拟处理意见" icon="ios-bookmark">
			<template #extra>
				提交日期：<DatePicker v-model="baseform.date" type="date" placeholder="选择日期" style="width: 200px"></DatePicker>
			</template>
			<FormItem label="复核拟处理意见" prop="undertaker_review">
				<Input v-model="baseform.undertaker_review" maxlength="300" show-word-limit type="textarea" :rows="5"/>
			</FormItem>
		</Card>
		</Form>
	</Col></Row></div>
</Modal>
</template>

<script>
import {dateUtils,appendDoc} from '@/libs/tools.js'
import config from '@/config'
export default{
	data(){
		return {
			modalEdit:true,
			baseform:{}
		}
	},
	methods:{
		handleModalEditCancel(){
			this.$router.go(-1)
		},
		handleModalEditOK(){
			let data={...this.baseform}
			data.date=dateUtils.format2(data.date)
			data.docs=appendDoc(data.docs,"doc207")
			this.$axios.post('mainCase1CreateDoc207.action',data).then(res=>{
				window.open(config.baseUrl+res.data,'_blank')
				this.$router.go(-1)
			})
			
		}
	},
	mounted(){
		this.$axios.post('mainCase1GetDoc207.action',{
			case_no:this.$route.query.case_no,
			party_type:this.$route.query.party_type
		}).then(res=>{
			this.baseform={...this.baseform,...res.data}
		})
	}
}
</script>

<style>
</style>